# Contributor: Damian Kurek <starfire24680@gmail.com>
# Maintainer: Damian Kurek <starfire24680@gmail.com>
pkgname=kodi-inputstream-rtmp
pkgver=19.0.1
_realname=Matrix
pkgrel=0
pkgdesc="RTMP input stream add-on for Kodi"
options="!check" # no test suite
url="https://github.com/xbmc/inputstream.rtmp"
arch="x86 x86_64 aarch64 armv7" # kodi
license="GPL-2.0-only"
makedepends="cmake rtmpdump-dev kodi-dev"
source="$pkgname-$pkgver-$_realname.tar.gz::https://github.com/xbmc/inputstream.rtmp/archive/$pkgver-$_realname.tar.gz"
builddir="$srcdir/inputstream.rtmp-$pkgver-$_realname"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_MODULE_PATH=/usr/lib/cmake/kodi \
		-DUSE_LTO=1
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="
084bfbb2e4ea63a6fad0d526f80aa55e47244630c07bd960764e50b44aab4a766169e93ae308e53cbe66b134a732edb21ef7979b2484c7a922d86ade1326a346  kodi-inputstream-rtmp-19.0.1-Matrix.tar.gz
"
